package slstone.quote.writtenEstimate.cmd;

import java.util.Map;

import org.apache.struts2.interceptor.RequestAware;

import slstone.quote.writtenEstimate.biz.WrittenEstimateBiz;
import slstone.quote.writtenEstimate.vo.WrittenEstimateSaveVO;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class WrittenEstimateSaveCmd extends ActionSupport implements ModelDriven<WrittenEstimateSaveVO>, RequestAware
{
	// private WrittenEstimateBiz weBiz = new WrittenEstimateBiz();
	private Map<String, Object> request;
	private WrittenEstimateSaveVO wesForm = new WrittenEstimateSaveVO();


	@Override
	public String execute() throws Exception
	{
		System.out.println(wesForm.getRowData());

		WrittenEstimateBiz weBiz = new WrittenEstimateBiz();
	
		weBiz.saveWrittenEstimate(wesForm);

		return SUCCESS;
	}

	
	@Override
	public void setRequest(Map<String, Object> request)
	{
		this.request = request;
	}

	@Override
	public WrittenEstimateSaveVO getModel()
	{
		return wesForm;
	}

}
